package gameModel;

public class Coord {
	
	// ATTRIBUTS
	
	public final int x;
	public final int y;
	
	// CONSTRUCTEUR
	
	public Coord(int x, int y) {
		this.x = x;
		this.y = y;
	}

	// REQUETES
	
	public Coord getNext(int dX, int dY) {
		return new Coord(x + dX, y + dY);
	}
	
	public boolean equals(Object o) {
		if (o == null) {
			return false;
		}
		Coord c = (Coord) o;
		return c.x == x && c.y == y;
	}
	
}
